<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.9.2" />
<title>graia.application.event.messages API documentation</title>
<meta name="description" content="" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/typography.min.css" integrity="sha256-7l/o7C8jubJiy74VsKTidCy1yBkRtiUGbVkYBylBqUg=" crossorigin>
<link rel="stylesheet preload" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/styles/github.min.css" crossorigin>
<style>:root{--highlight-color:#fe9}.flex{display:flex !important}body{line-height:1.5em}#content{padding:20px}#sidebar{padding:30px;overflow:hidden}#sidebar > *:last-child{margin-bottom:2cm}.http-server-breadcrumbs{font-size:130%;margin:0 0 15px 0}#footer{font-size:.75em;padding:5px 30px;border-top:1px solid #ddd;text-align:right}#footer p{margin:0 0 0 1em;display:inline-block}#footer p:last-child{margin-right:30px}h1,h2,h3,h4,h5{font-weight:300}h1{font-size:2.5em;line-height:1.1em}h2{font-size:1.75em;margin:1em 0 .50em 0}h3{font-size:1.4em;margin:25px 0 10px 0}h4{margin:0;font-size:105%}h1:target,h2:target,h3:target,h4:target,h5:target,h6:target{background:var(--highlight-color);padding:.2em 0}a{color:#058;text-decoration:none;transition:color .3s ease-in-out}a:hover{color:#e82}.title code{font-weight:bold}h2[id^="header-"]{margin-top:2em}.ident{color:#900}pre code{background:#f8f8f8;font-size:.8em;line-height:1.4em}code{background:#f2f2f1;padding:1px 4px;overflow-wrap:break-word}h1 code{background:transparent}pre{background:#f8f8f8;border:0;border-top:1px solid #ccc;border-bottom:1px solid #ccc;margin:1em 0;padding:1ex}#http-server-module-list{display:flex;flex-flow:column}#http-server-module-list div{display:flex}#http-server-module-list dt{min-width:10%}#http-server-module-list p{margin-top:0}.toc ul,#index{list-style-type:none;margin:0;padding:0}#index code{background:transparent}#index h3{border-bottom:1px solid #ddd}#index ul{padding:0}#index h4{margin-top:.6em;font-weight:bold}@media (min-width:200ex){#index .two-column{column-count:2}}@media (min-width:300ex){#index .two-column{column-count:3}}dl{margin-bottom:2em}dl dl:last-child{margin-bottom:4em}dd{margin:0 0 1em 3em}#header-classes + dl > dd{margin-bottom:3em}dd dd{margin-left:2em}dd p{margin:10px 0}.name{background:#eee;font-weight:bold;font-size:.85em;padding:5px 10px;display:inline-block;min-width:40%}.name:hover{background:#e0e0e0}dt:target .name{background:var(--highlight-color)}.name > span:first-child{white-space:nowrap}.name.class > span:nth-child(2){margin-left:.4em}.inherited{color:#999;border-left:5px solid #eee;padding-left:1em}.inheritance em{font-style:normal;font-weight:bold}.desc h2{font-weight:400;font-size:1.25em}.desc h3{font-size:1em}.desc dt code{background:inherit}.source summary,.git-link-div{color:#666;text-align:right;font-weight:400;font-size:.8em;text-transform:uppercase}.source summary > *{white-space:nowrap;cursor:pointer}.git-link{color:inherit;margin-left:1em}.source pre{max-height:500px;overflow:auto;margin:0}.source pre code{font-size:12px;overflow:visible}.hlist{list-style:none}.hlist li{display:inline}.hlist li:after{content:',\2002'}.hlist li:last-child:after{content:none}.hlist .hlist{display:inline;padding-left:1em}img{max-width:100%}td{padding:0 .5em}.admonition{padding:.1em .5em;margin-bottom:1em}.admonition-title{font-weight:bold}.admonition.note,.admonition.info,.admonition.important{background:#aef}.admonition.todo,.admonition.versionadded,.admonition.tip,.admonition.hint{background:#dfd}.admonition.warning,.admonition.versionchanged,.admonition.deprecated{background:#fd4}.admonition.error,.admonition.danger,.admonition.caution{background:lightpink}</style>
<style media="screen and (min-width: 700px)">@media screen and (min-width:700px){#sidebar{width:30%;height:100vh;overflow:auto;position:sticky;top:0}#content{width:70%;max-width:100ch;padding:3em 4em;border-left:1px solid #ddd}pre code{font-size:1em}.item .name{font-size:1em}main{display:flex;flex-direction:row-reverse;justify-content:flex-end}.toc ul ul,#index ul{padding-left:1.5em}.toc > ul > li{margin-top:.5em}}</style>
<style media="print">@media print{#sidebar h1{page-break-before:always}.source{display:none}}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a[href]:after{content:" (" attr(href) ")";font-size:90%}a[href][title]:after{content:none}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h1,h2,h3,h4,h5,h6{page-break-after:avoid}}</style>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/highlight.min.js" integrity="sha256-Uv3H6lx7dJmRfRvH8TH6kJD1TSK1aFcwgx+mdg3epi8=" crossorigin></script>
<script>window.addEventListener('DOMContentLoaded', () => hljs.initHighlighting())</script>
</head>
<body>
<main>
<article id="content">
<header>
<h1 class="title">Module <code>graia.application.event.messages</code></h1>
</header>
<section id="section-intro">
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">from typing import List
from datetime import datetime
from pydantic import validator, Field
from pydantic.main import BaseModel

from graia.application.event.dispatcher import MessageChainCatcher
from graia.application.message.chain import MessageChain
from graia.broadcast.entities.dispatcher import BaseDispatcher
from graia.broadcast.interfaces.dispatcher import DispatcherInterface
from graia.application.group import Member, Group
from graia.application.friend import Friend
from graia.application.message.elements.internal import Source
from . import ApplicationDispatcher, MiraiEvent


class SourceElementDispatcher(BaseDispatcher):
    @staticmethod
    async def catch(interface: DispatcherInterface):
        if interface.annotation is Source:
            return interface.event.messageChain.getFirst(Source)


class FriendMessage(MiraiEvent):
    type: str = &#34;FriendMessage&#34;
    messageChain: MessageChain
    sender: Friend

    class Dispatcher(BaseDispatcher):
        mixin = [MessageChainCatcher, ApplicationDispatcher, SourceElementDispatcher]

        @staticmethod
        async def catch(interface: DispatcherInterface):
            if interface.annotation is Friend:
                return interface.event.sender


class GroupMessage(MiraiEvent):
    type: str = &#34;GroupMessage&#34;
    messageChain: MessageChain
    sender: Member

    class Dispatcher(BaseDispatcher):
        mixin = [MessageChainCatcher, ApplicationDispatcher, SourceElementDispatcher]

        @staticmethod
        async def catch(interface: DispatcherInterface):
            if interface.annotation is Group:
                return interface.event.sender.group
            elif interface.annotation is Member:
                return interface.event.sender


class TempMessage(MiraiEvent):
    type: str = &#34;TempMessage&#34;
    messageChain: MessageChain
    sender: Member

    @classmethod
    def parse_obj(cls, obj):
        return super().parse_obj(obj)

    class Dispatcher(BaseDispatcher):
        mixin = [MessageChainCatcher, ApplicationDispatcher, SourceElementDispatcher]

        @staticmethod
        async def catch(interface: DispatcherInterface):
            if interface.annotation is Group:
                return interface.event.sender.group
            elif interface.annotation is Member:
                return interface.event.sender


class ForwardContentMessage(BaseModel):
    senderId: int
    senderName: str

    messageChain: MessageChain

    time: datetime


class Forward(MiraiEvent):
    type: str = &#34;Forward&#34;

    &#34;表示该条转发消息的标题, 通常为 `群聊的聊天记录`&#34;
    title: str

    &#34;显示在消息列表中的预览文本, 调用 asDisplay 方法返回该值&#34;
    brief: str

    &#34;似乎没有什么用, 这个东西找不到在哪里显示&#34;
    source: str

    &#34;描述, 通常都像: `查看 x 条转发消息` 这样&#34;
    summary: str

    content: List[ForwardContentMessage] = Field(..., alias=&#34;nodeList&#34;)

    def asDisplay(self):
        return self.brief

    class Dispatcher(BaseDispatcher):
        mixin = [MessageChainCatcher, ApplicationDispatcher]

        @staticmethod
        async def catch(interface: DispatcherInterface):
            pass</code></pre>
</details>
</section>
<section>
</section>
<section>
</section>
<section>
</section>
<section>
<h2 class="section-title" id="header-classes">Classes</h2>
<dl>
<dt id="graia.application.event.messages.Forward"><code class="flex name class">
<span>class <span class="ident">Forward</span></span>
<span>(</span><span>**data: Any)</span>
</code></dt>
<dd>
<div class="desc"><p>Create a new model by parsing and validating input data from keyword arguments.</p>
<p>Raises ValidationError if the input data cannot be parsed to form a valid model.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">class Forward(MiraiEvent):
    type: str = &#34;Forward&#34;

    &#34;表示该条转发消息的标题, 通常为 `群聊的聊天记录`&#34;
    title: str

    &#34;显示在消息列表中的预览文本, 调用 asDisplay 方法返回该值&#34;
    brief: str

    &#34;似乎没有什么用, 这个东西找不到在哪里显示&#34;
    source: str

    &#34;描述, 通常都像: `查看 x 条转发消息` 这样&#34;
    summary: str

    content: List[ForwardContentMessage] = Field(..., alias=&#34;nodeList&#34;)

    def asDisplay(self):
        return self.brief

    class Dispatcher(BaseDispatcher):
        mixin = [MessageChainCatcher, ApplicationDispatcher]

        @staticmethod
        async def catch(interface: DispatcherInterface):
            pass</code></pre>
</details>
<h3>Ancestors</h3>
<ul class="hlist">
<li><a title="graia.application.event.MiraiEvent" href="index.html#graia.application.event.MiraiEvent">MiraiEvent</a></li>
<li><a title="graia.broadcast.entities.event.BaseEvent" href="../../broadcast/entities/event.html#graia.broadcast.entities.event.BaseEvent">BaseEvent</a></li>
<li>pydantic.main.BaseModel</li>
<li>pydantic.utils.Representation</li>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="graia.application.event.messages.Forward.Dispatcher"><code class="name">var <span class="ident">Dispatcher</span></code></dt>
<dd>
<div class="desc"><p>所有非单函数型 Dispatcher 的基类, 用于为参数解析提供可扩展的支持.</p></div>
</dd>
<dt id="graia.application.event.messages.Forward.brief"><code class="name">var <span class="ident">brief</span> : str</code></dt>
<dd>
<div class="desc"><p>似乎没有什么用, 这个东西找不到在哪里显示</p></div>
</dd>
<dt id="graia.application.event.messages.Forward.content"><code class="name">var <span class="ident">content</span> : List[<a title="graia.application.event.messages.ForwardContentMessage" href="#graia.application.event.messages.ForwardContentMessage">ForwardContentMessage</a>]</code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="graia.application.event.messages.Forward.source"><code class="name">var <span class="ident">source</span> : str</code></dt>
<dd>
<div class="desc"><p>描述, 通常都像: <code>查看 x 条转发消息</code> 这样</p></div>
</dd>
<dt id="graia.application.event.messages.Forward.summary"><code class="name">var <span class="ident">summary</span> : str</code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="graia.application.event.messages.Forward.title"><code class="name">var <span class="ident">title</span> : str</code></dt>
<dd>
<div class="desc"><p>显示在消息列表中的预览文本, 调用 asDisplay 方法返回该值</p></div>
</dd>
<dt id="graia.application.event.messages.Forward.type"><code class="name">var <span class="ident">type</span> : str</code></dt>
<dd>
<div class="desc"><p>表示该条转发消息的标题, 通常为 <code>群聊的聊天记录</code></p></div>
</dd>
</dl>
<h3>Methods</h3>
<dl>
<dt id="graia.application.event.messages.Forward.asDisplay"><code class="name flex">
<span>def <span class="ident">asDisplay</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def asDisplay(self):
    return self.brief</code></pre>
</details>
</dd>
</dl>
</dd>
<dt id="graia.application.event.messages.ForwardContentMessage"><code class="flex name class">
<span>class <span class="ident">ForwardContentMessage</span></span>
<span>(</span><span>**data: Any)</span>
</code></dt>
<dd>
<div class="desc"><p>Create a new model by parsing and validating input data from keyword arguments.</p>
<p>Raises ValidationError if the input data cannot be parsed to form a valid model.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">class ForwardContentMessage(BaseModel):
    senderId: int
    senderName: str

    messageChain: MessageChain

    time: datetime</code></pre>
</details>
<h3>Ancestors</h3>
<ul class="hlist">
<li>pydantic.main.BaseModel</li>
<li>pydantic.utils.Representation</li>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="graia.application.event.messages.ForwardContentMessage.messageChain"><code class="name">var <span class="ident">messageChain</span> : <a title="graia.application.message.chain.MessageChain" href="../message/chain.html#graia.application.message.chain.MessageChain">MessageChain</a></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="graia.application.event.messages.ForwardContentMessage.senderId"><code class="name">var <span class="ident">senderId</span> : int</code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="graia.application.event.messages.ForwardContentMessage.senderName"><code class="name">var <span class="ident">senderName</span> : str</code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="graia.application.event.messages.ForwardContentMessage.time"><code class="name">var <span class="ident">time</span> : datetime.datetime</code></dt>
<dd>
<div class="desc"></div>
</dd>
</dl>
</dd>
<dt id="graia.application.event.messages.FriendMessage"><code class="flex name class">
<span>class <span class="ident">FriendMessage</span></span>
<span>(</span><span>**data: Any)</span>
</code></dt>
<dd>
<div class="desc"><p>Create a new model by parsing and validating input data from keyword arguments.</p>
<p>Raises ValidationError if the input data cannot be parsed to form a valid model.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">class FriendMessage(MiraiEvent):
    type: str = &#34;FriendMessage&#34;
    messageChain: MessageChain
    sender: Friend

    class Dispatcher(BaseDispatcher):
        mixin = [MessageChainCatcher, ApplicationDispatcher, SourceElementDispatcher]

        @staticmethod
        async def catch(interface: DispatcherInterface):
            if interface.annotation is Friend:
                return interface.event.sender</code></pre>
</details>
<h3>Ancestors</h3>
<ul class="hlist">
<li><a title="graia.application.event.MiraiEvent" href="index.html#graia.application.event.MiraiEvent">MiraiEvent</a></li>
<li><a title="graia.broadcast.entities.event.BaseEvent" href="../../broadcast/entities/event.html#graia.broadcast.entities.event.BaseEvent">BaseEvent</a></li>
<li>pydantic.main.BaseModel</li>
<li>pydantic.utils.Representation</li>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="graia.application.event.messages.FriendMessage.Dispatcher"><code class="name">var <span class="ident">Dispatcher</span></code></dt>
<dd>
<div class="desc"><p>所有非单函数型 Dispatcher 的基类, 用于为参数解析提供可扩展的支持.</p></div>
</dd>
<dt id="graia.application.event.messages.FriendMessage.messageChain"><code class="name">var <span class="ident">messageChain</span> : <a title="graia.application.message.chain.MessageChain" href="../message/chain.html#graia.application.message.chain.MessageChain">MessageChain</a></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="graia.application.event.messages.FriendMessage.sender"><code class="name">var <span class="ident">sender</span> : <a title="graia.application.friend.Friend" href="../friend.html#graia.application.friend.Friend">Friend</a></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="graia.application.event.messages.FriendMessage.type"><code class="name">var <span class="ident">type</span> : str</code></dt>
<dd>
<div class="desc"></div>
</dd>
</dl>
</dd>
<dt id="graia.application.event.messages.GroupMessage"><code class="flex name class">
<span>class <span class="ident">GroupMessage</span></span>
<span>(</span><span>**data: Any)</span>
</code></dt>
<dd>
<div class="desc"><p>Create a new model by parsing and validating input data from keyword arguments.</p>
<p>Raises ValidationError if the input data cannot be parsed to form a valid model.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">class GroupMessage(MiraiEvent):
    type: str = &#34;GroupMessage&#34;
    messageChain: MessageChain
    sender: Member

    class Dispatcher(BaseDispatcher):
        mixin = [MessageChainCatcher, ApplicationDispatcher, SourceElementDispatcher]

        @staticmethod
        async def catch(interface: DispatcherInterface):
            if interface.annotation is Group:
                return interface.event.sender.group
            elif interface.annotation is Member:
                return interface.event.sender</code></pre>
</details>
<h3>Ancestors</h3>
<ul class="hlist">
<li><a title="graia.application.event.MiraiEvent" href="index.html#graia.application.event.MiraiEvent">MiraiEvent</a></li>
<li><a title="graia.broadcast.entities.event.BaseEvent" href="../../broadcast/entities/event.html#graia.broadcast.entities.event.BaseEvent">BaseEvent</a></li>
<li>pydantic.main.BaseModel</li>
<li>pydantic.utils.Representation</li>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="graia.application.event.messages.GroupMessage.Dispatcher"><code class="name">var <span class="ident">Dispatcher</span></code></dt>
<dd>
<div class="desc"><p>所有非单函数型 Dispatcher 的基类, 用于为参数解析提供可扩展的支持.</p></div>
</dd>
<dt id="graia.application.event.messages.GroupMessage.messageChain"><code class="name">var <span class="ident">messageChain</span> : <a title="graia.application.message.chain.MessageChain" href="../message/chain.html#graia.application.message.chain.MessageChain">MessageChain</a></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="graia.application.event.messages.GroupMessage.sender"><code class="name">var <span class="ident">sender</span> : <a title="graia.application.group.Member" href="../group.html#graia.application.group.Member">Member</a></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="graia.application.event.messages.GroupMessage.type"><code class="name">var <span class="ident">type</span> : str</code></dt>
<dd>
<div class="desc"></div>
</dd>
</dl>
</dd>
<dt id="graia.application.event.messages.SourceElementDispatcher"><code class="flex name class">
<span>class <span class="ident">SourceElementDispatcher</span></span>
</code></dt>
<dd>
<div class="desc"><p>所有非单函数型 Dispatcher 的基类, 用于为参数解析提供可扩展的支持.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">class SourceElementDispatcher(BaseDispatcher):
    @staticmethod
    async def catch(interface: DispatcherInterface):
        if interface.annotation is Source:
            return interface.event.messageChain.getFirst(Source)</code></pre>
</details>
<h3>Ancestors</h3>
<ul class="hlist">
<li><a title="graia.broadcast.entities.dispatcher.BaseDispatcher" href="../../broadcast/entities/dispatcher.html#graia.broadcast.entities.dispatcher.BaseDispatcher">BaseDispatcher</a></li>
</ul>
<h3>Inherited members</h3>
<ul class="hlist">
<li><code><b><a title="graia.broadcast.entities.dispatcher.BaseDispatcher" href="../../broadcast/entities/dispatcher.html#graia.broadcast.entities.dispatcher.BaseDispatcher">BaseDispatcher</a></b></code>:
<ul class="hlist">
<li><code><a title="graia.broadcast.entities.dispatcher.BaseDispatcher.afterDispatch" href="../../broadcast/entities/dispatcher.html#graia.broadcast.entities.dispatcher.BaseDispatcher.afterDispatch">afterDispatch</a></code></li>
<li><code><a title="graia.broadcast.entities.dispatcher.BaseDispatcher.afterExecution" href="../../broadcast/entities/dispatcher.html#graia.broadcast.entities.dispatcher.BaseDispatcher.afterExecution">afterExecution</a></code></li>
<li><code><a title="graia.broadcast.entities.dispatcher.BaseDispatcher.afterTargetExec" href="../../broadcast/entities/dispatcher.html#graia.broadcast.entities.dispatcher.BaseDispatcher.afterTargetExec">afterTargetExec</a></code></li>
<li><code><a title="graia.broadcast.entities.dispatcher.BaseDispatcher.beforeDispatch" href="../../broadcast/entities/dispatcher.html#graia.broadcast.entities.dispatcher.BaseDispatcher.beforeDispatch">beforeDispatch</a></code></li>
<li><code><a title="graia.broadcast.entities.dispatcher.BaseDispatcher.beforeExecution" href="../../broadcast/entities/dispatcher.html#graia.broadcast.entities.dispatcher.BaseDispatcher.beforeExecution">beforeExecution</a></code></li>
<li><code><a title="graia.broadcast.entities.dispatcher.BaseDispatcher.beforeTargetExec" href="../../broadcast/entities/dispatcher.html#graia.broadcast.entities.dispatcher.BaseDispatcher.beforeTargetExec">beforeTargetExec</a></code></li>
<li><code><a title="graia.broadcast.entities.dispatcher.BaseDispatcher.catch" href="../../broadcast/entities/dispatcher.html#graia.broadcast.entities.dispatcher.BaseDispatcher.catch">catch</a></code></li>
<li><code><a title="graia.broadcast.entities.dispatcher.BaseDispatcher.mixin" href="../../broadcast/entities/dispatcher.html#graia.broadcast.entities.dispatcher.BaseDispatcher.mixin">mixin</a></code></li>
<li><code><a title="graia.broadcast.entities.dispatcher.BaseDispatcher.onActive" href="../../broadcast/entities/dispatcher.html#graia.broadcast.entities.dispatcher.BaseDispatcher.onActive">onActive</a></code></li>
</ul>
</li>
</ul>
</dd>
<dt id="graia.application.event.messages.TempMessage"><code class="flex name class">
<span>class <span class="ident">TempMessage</span></span>
<span>(</span><span>**data: Any)</span>
</code></dt>
<dd>
<div class="desc"><p>Create a new model by parsing and validating input data from keyword arguments.</p>
<p>Raises ValidationError if the input data cannot be parsed to form a valid model.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">class TempMessage(MiraiEvent):
    type: str = &#34;TempMessage&#34;
    messageChain: MessageChain
    sender: Member

    @classmethod
    def parse_obj(cls, obj):
        return super().parse_obj(obj)

    class Dispatcher(BaseDispatcher):
        mixin = [MessageChainCatcher, ApplicationDispatcher, SourceElementDispatcher]

        @staticmethod
        async def catch(interface: DispatcherInterface):
            if interface.annotation is Group:
                return interface.event.sender.group
            elif interface.annotation is Member:
                return interface.event.sender</code></pre>
</details>
<h3>Ancestors</h3>
<ul class="hlist">
<li><a title="graia.application.event.MiraiEvent" href="index.html#graia.application.event.MiraiEvent">MiraiEvent</a></li>
<li><a title="graia.broadcast.entities.event.BaseEvent" href="../../broadcast/entities/event.html#graia.broadcast.entities.event.BaseEvent">BaseEvent</a></li>
<li>pydantic.main.BaseModel</li>
<li>pydantic.utils.Representation</li>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="graia.application.event.messages.TempMessage.Dispatcher"><code class="name">var <span class="ident">Dispatcher</span></code></dt>
<dd>
<div class="desc"><p>所有非单函数型 Dispatcher 的基类, 用于为参数解析提供可扩展的支持.</p></div>
</dd>
<dt id="graia.application.event.messages.TempMessage.messageChain"><code class="name">var <span class="ident">messageChain</span> : <a title="graia.application.message.chain.MessageChain" href="../message/chain.html#graia.application.message.chain.MessageChain">MessageChain</a></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="graia.application.event.messages.TempMessage.sender"><code class="name">var <span class="ident">sender</span> : <a title="graia.application.group.Member" href="../group.html#graia.application.group.Member">Member</a></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="graia.application.event.messages.TempMessage.type"><code class="name">var <span class="ident">type</span> : str</code></dt>
<dd>
<div class="desc"></div>
</dd>
</dl>
<h3>Static methods</h3>
<dl>
<dt id="graia.application.event.messages.TempMessage.parse_obj"><code class="name flex">
<span>def <span class="ident">parse_obj</span></span>(<span>obj)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">@classmethod
def parse_obj(cls, obj):
    return super().parse_obj(obj)</code></pre>
</details>
</dd>
</dl>
</dd>
</dl>
</section>
</article>
<nav id="sidebar">
<h1>Index</h1>
<div class="toc">
<ul></ul>
</div>
<ul id="index">
<li><h3>Super-module</h3>
<ul>
<li><code><a title="graia.application.event" href="index.html">graia.application.event</a></code></li>
</ul>
</li>
<li><h3><a href="#header-classes">Classes</a></h3>
<ul>
<li>
<h4><code><a title="graia.application.event.messages.Forward" href="#graia.application.event.messages.Forward">Forward</a></code></h4>
<ul class="two-column">
<li><code><a title="graia.application.event.messages.Forward.Dispatcher" href="#graia.application.event.messages.Forward.Dispatcher">Dispatcher</a></code></li>
<li><code><a title="graia.application.event.messages.Forward.asDisplay" href="#graia.application.event.messages.Forward.asDisplay">asDisplay</a></code></li>
<li><code><a title="graia.application.event.messages.Forward.brief" href="#graia.application.event.messages.Forward.brief">brief</a></code></li>
<li><code><a title="graia.application.event.messages.Forward.content" href="#graia.application.event.messages.Forward.content">content</a></code></li>
<li><code><a title="graia.application.event.messages.Forward.source" href="#graia.application.event.messages.Forward.source">source</a></code></li>
<li><code><a title="graia.application.event.messages.Forward.summary" href="#graia.application.event.messages.Forward.summary">summary</a></code></li>
<li><code><a title="graia.application.event.messages.Forward.title" href="#graia.application.event.messages.Forward.title">title</a></code></li>
<li><code><a title="graia.application.event.messages.Forward.type" href="#graia.application.event.messages.Forward.type">type</a></code></li>
</ul>
</li>
<li>
<h4><code><a title="graia.application.event.messages.ForwardContentMessage" href="#graia.application.event.messages.ForwardContentMessage">ForwardContentMessage</a></code></h4>
<ul class="">
<li><code><a title="graia.application.event.messages.ForwardContentMessage.messageChain" href="#graia.application.event.messages.ForwardContentMessage.messageChain">messageChain</a></code></li>
<li><code><a title="graia.application.event.messages.ForwardContentMessage.senderId" href="#graia.application.event.messages.ForwardContentMessage.senderId">senderId</a></code></li>
<li><code><a title="graia.application.event.messages.ForwardContentMessage.senderName" href="#graia.application.event.messages.ForwardContentMessage.senderName">senderName</a></code></li>
<li><code><a title="graia.application.event.messages.ForwardContentMessage.time" href="#graia.application.event.messages.ForwardContentMessage.time">time</a></code></li>
</ul>
</li>
<li>
<h4><code><a title="graia.application.event.messages.FriendMessage" href="#graia.application.event.messages.FriendMessage">FriendMessage</a></code></h4>
<ul class="">
<li><code><a title="graia.application.event.messages.FriendMessage.Dispatcher" href="#graia.application.event.messages.FriendMessage.Dispatcher">Dispatcher</a></code></li>
<li><code><a title="graia.application.event.messages.FriendMessage.messageChain" href="#graia.application.event.messages.FriendMessage.messageChain">messageChain</a></code></li>
<li><code><a title="graia.application.event.messages.FriendMessage.sender" href="#graia.application.event.messages.FriendMessage.sender">sender</a></code></li>
<li><code><a title="graia.application.event.messages.FriendMessage.type" href="#graia.application.event.messages.FriendMessage.type">type</a></code></li>
</ul>
</li>
<li>
<h4><code><a title="graia.application.event.messages.GroupMessage" href="#graia.application.event.messages.GroupMessage">GroupMessage</a></code></h4>
<ul class="">
<li><code><a title="graia.application.event.messages.GroupMessage.Dispatcher" href="#graia.application.event.messages.GroupMessage.Dispatcher">Dispatcher</a></code></li>
<li><code><a title="graia.application.event.messages.GroupMessage.messageChain" href="#graia.application.event.messages.GroupMessage.messageChain">messageChain</a></code></li>
<li><code><a title="graia.application.event.messages.GroupMessage.sender" href="#graia.application.event.messages.GroupMessage.sender">sender</a></code></li>
<li><code><a title="graia.application.event.messages.GroupMessage.type" href="#graia.application.event.messages.GroupMessage.type">type</a></code></li>
</ul>
</li>
<li>
<h4><code><a title="graia.application.event.messages.SourceElementDispatcher" href="#graia.application.event.messages.SourceElementDispatcher">SourceElementDispatcher</a></code></h4>
</li>
<li>
<h4><code><a title="graia.application.event.messages.TempMessage" href="#graia.application.event.messages.TempMessage">TempMessage</a></code></h4>
<ul class="">
<li><code><a title="graia.application.event.messages.TempMessage.Dispatcher" href="#graia.application.event.messages.TempMessage.Dispatcher">Dispatcher</a></code></li>
<li><code><a title="graia.application.event.messages.TempMessage.messageChain" href="#graia.application.event.messages.TempMessage.messageChain">messageChain</a></code></li>
<li><code><a title="graia.application.event.messages.TempMessage.parse_obj" href="#graia.application.event.messages.TempMessage.parse_obj">parse_obj</a></code></li>
<li><code><a title="graia.application.event.messages.TempMessage.sender" href="#graia.application.event.messages.TempMessage.sender">sender</a></code></li>
<li><code><a title="graia.application.event.messages.TempMessage.type" href="#graia.application.event.messages.TempMessage.type">type</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc"><cite>pdoc</cite> 0.9.2</a>.</p>
</footer>
</body>
</html>